/**

   uuid.h
   ======

   Header for uuid

**/


#ifndef UUID_H
#define UUID_H


/**

   Includes
   --------

   - stdint.h  : uintX_t

**/

#include <stdint.h>


/**

	Structure: struct uuid
	----------------------
	
	64-bits UUID. Members are:
	- sec       : seconds since Epoch
	- msec      : millisecond since Epoch
	- seq       : sequence number
	- node_rand : node id and random
	
**/

struct uuid
{
	uint32_t sec;
	uint16_t msec;
	uint8_t seq;
	uint8_t node_rand;
};


/**

   Prototypes
   ----------

**/


struct uuid* uuid_create(void);
int uuid_compare(struct uuid* u1, struct uuid* u2);
void uuid_delete(struct uuid* uuid);


#endif
